<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="Configuration"
                  targetNamespace="http://schemas.ntrace.org/tracing/Configuration.xsd"
                  elementFormDefault="qualified"
                  xmlns="http://schemas.ntrace.org/tracing/Configuration.xsd"
                  xmlns:mstns="http://schemas.ntrace.org/tracing/Configuration.xsd"
                  xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:simpleType name="CSharpIdentifier">
    <xs:restriction base="xs:string">
      <xs:pattern value="[a-zA-Z]\w*"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="Configuration">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="ProviderType">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Namespace" default="NTrace">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:pattern value="[a-zA-Z]\w*(?:\.[a-zA-Z]\w*)*"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Name" type="CSharpIdentifier" default="EtwProvider"/>
            </xs:sequence>
          </xs:complexType>          
        </xs:element>
        <xs:element name="MethodTracing">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Level" type="xs:string"/>
              <xs:element name="Flag" type="xs:string"/>
              <xs:element name="EntryMessage" type="xs:string" default="Enter."/>
              <xs:element name="ExitMessage" type="xs:string" default="Exit."/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="Macros">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Trace" type="CSharpIdentifier" default="Trace"/>
              <xs:element name="TraceLevelCheck" type="CSharpIdentifier" default="TraceLevelEnabled"/>
              <xs:element name="TraceFlagCheck" type="CSharpIdentifier" default="TraceFlagEnabled"/>
              <xs:element name="TraceLevelFlagCheck" type="CSharpIdentifier" default="TraceLevelAndFlagEnabled"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="TraceLevels">
          <xs:complexType>
            <xs:sequence>
              <xs:any/>
              </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element name="TraceFlags">
          <xs:complexType>
            <xs:sequence>
              <xs:any/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>    
  </xs:element>
</xs:schema>
